package com.itheima.dubbo.service.impl;

import com.itheima.dubbo.HelloFaceService;
import com.itheima.pojo.User;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author by jojo
 * @Date 2022/3/25
 * @Description
 */
//@DubboService(version = "1.0.0",timeout = 3000,retries = 1)
@DubboService(timeout = 2000)
public class HelloFaceServiceImpl implements HelloFaceService {

    @Override
    public String hello(String name) {
        System.out.println("killqueen...");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hello,killqueen,name:"+name;
    }

    @Override
    public User byUser() {
        User user = new User();
        user.setName("killerQueen");
        user.setAge(18);
        return user;
    }
}
